Description | : The `Get Route Directions` API is an HTTP `GET` request that returns a route between an origin and a destination, passing through waypoints if specified. The route takes into account factors such as current traffic and the typical road speeds on the requested day of the week and time of day. Information returned includes the distance, estimated travel time, and a representation of the route geometry. Additional routing information such as optimized waypoint order or turn by turn instructions is also available, depending on the options selected. Routing service provides a set of parameters for a detailed description of a vehicle-specific consumption model. For more information, see [Consumption Model](/azure/azure-maps/consumption-model). |
Reference | : Link ¶ |
⚶ Changes
{ "#id": "Route_GetRouteDirections", "$parameters": [ { "#name": "query", "Description": { "new": "The Coordinates through which the route is calculated, delimited by a colon. A minimum of two coordinates is required. The first one is the origin and the last is the destination of the route. Optional coordinates in-between act as waypoints in the route. You can pass up to 150 waypoints.", "old": "The Coordinates through which the route is calculated, delimited by a colon. A minimum of two coordinates is required. The first one is the origin and the last is the destination of the route. Optional coordinates in-between act as WayPoints in the route. You can pass up to 150 WayPoints." } } ] }
⚼ Request
GET:
/route/directions/{format}
{
x-ms-client-id:
string
,
api-version:
string
,
format:
string
,
query:
string
,
maxAlternatives:
integer
,
alternativeType:
string
,
minDeviationDistance:
integer
,
arriveAt:
string
,
departAt:
string
,
minDeviationTime:
integer
,
instructionsType:
string
,
language:
string
,
computeBestOrder:
boolean
,
routeRepresentation:
string
,
computeTravelTimeFor:
string
,
vehicleHeading:
integer
,
report:
string
,
sectionType:
array
,
vehicleAxleWeight:
integer
,
vehicleWidth:
number
,
vehicleHeight:
number
,
vehicleLength:
number
,
vehicleMaxSpeed:
integer
,
vehicleWeight:
integer
,
vehicleCommercial:
boolean
,
windingness:
string
,
hilliness:
string
,
travelMode:
string
,
avoid:
array
,
traffic:
boolean
,
routeType:
string
,
vehicleLoadType:
string
,
vehicleEngineType:
string
,
constantSpeedConsumptionInLitersPerHundredkm:
string
,
currentFuelInLiters:
number
,
auxiliaryPowerInLitersPerHour:
number
,
fuelEnergyDensityInMJoulesPerLiter:
number
,
accelerationEfficiency:
number
,
decelerationEfficiency:
number
,
uphillEfficiency:
number
,
downhillEfficiency:
number
,
constantSpeedConsumptionInkWhPerHundredkm:
string
,
currentChargeInkWh:
number
,
maxChargeInkWh:
number
,
auxiliaryPowerInkW:
number
,
}
⚐ Response (200)
{
formatVersion:
string
,
routes:
[
]
,
{
,
summary:
{
,
lengthInMeters:
integer
,
travelTimeInSeconds:
integer
,
trafficDelayInSeconds:
integer
,
departureTime:
string
,
arrivalTime:
string
,
}
legs:
[
]
,
{
,
summary:
{
,
lengthInMeters:
integer
,
travelTimeInSeconds:
integer
,
trafficDelayInSeconds:
integer
,
departureTime:
string
,
arrivalTime:
string
,
noTrafficTravelTimeInSeconds:
integer
,
historicTrafficTravelTimeInSeconds:
integer
,
liveTrafficIncidentsTravelTimeInSeconds:
integer
,
fuelConsumptionInLiters:
number
,
batteryConsumptionInkWh:
number
,
}
points:
}
[
]
,
{
,
latitude:
number
,
longitude:
number
,
}
sections:
[
]
,
{
,
startPointIndex:
integer
,
endPointIndex:
integer
,
sectionType:
enum
,
travelMode:
enum
,
simpleCategory:
enum
,
effectiveSpeedInKmh:
integer
,
delayInSeconds:
integer
,
magnitudeOfDelay:
enum
,
tec:
}
{
,
effectCode:
integer
,
causes:
}
[
]
,
{
,
mainCauseCode:
integer
,
subCauseCode:
integer
,
}
guidance:
}
{
,
instructions:
[
]
,
{
,
routeOffsetInMeters:
integer
,
travelTimeInSeconds:
integer
,
point:
{
,
latitude:
number
,
longitude:
number
,
}
pointIndex:
integer
,
instructionType:
enum
,
roadNumbers:
[
,
string
,
]
exitNumber:
string
,
street:
string
,
signpostText:
string
,
countryCode:
string
,
stateCode:
string
,
junctionType:
enum
,
turnAngleInDecimalDegrees:
integer
,
roundaboutExitNumber:
integer
,
possibleCombineWithNext:
boolean
,
drivingSide:
enum
,
maneuver:
enum
,
message:
string
,
combinedMessage:
string
,
}
instructionGroups:
}
[
]
,
{
,
firstInstructionIndex:
integer
,
lastInstructionIndex:
integer
,
groupLengthInMeters:
integer
,
groupMessage:
string
,
}
optimizedWaypoints:
[
]
,
{
,
providedIndex:
integer
,
optimizedIndex:
integer
,
}
report:
}
{
,
effectiveSettings:
}
[
]
,
{
,
key:
string
,
value:
string
,
}
⚐ Response (default)
{
error:
}
{
,
code:
string
,
message:
string
,
target:
string
,
details:
[
,
string
,
]
additionalInfo:
}
[
]
,
{
,
type:
string
,
info:
object
,
}